<div class="row"> <h3 class="page-header">数据报表</h3></div>
<div class="row">
    <div class="panel panel-default">
        <div class="panel-body">
           <!--  <label><a class="btn btn-primary" href="{:U('Yqgl/add')}">添加</a></label> -->
            <form action='{:U("Yqgl/index")}' class="form-inline text-right fr m-b-5">
                名称：<input type="text" name='name' value='{$Think.get.name}' class="form-control mr20 w150" >
                <button class="btn btn-primary" type="submit">搜索</button>
            </form>
            <div class="table-responsive">
                <table class="table table-striped table-bordered table-hover">
                    <thead>
                    <tr>
                        <th>序号</th>
                        <th>设备编号</th>
                        <th>设备名称</th>
                        <th>单位</th>
                        <th>使用者</th>
                        <th>数量</th>
                       <!--  <th>报废情况</th> -->
                    </tr>
                    </thead>
                    <tbody>
                    <volist name="list" id="list">
                        <tr>
                            <td>{$i}</td>
                            <td>{$list.number}</td>
                            <td>{$list.name}</td>
                            <td>{$list.unit}</td>
                            <td>{$list.person}</td>
                            <td>{$list.txyy}</td>
                            <!-- <td>{$list.bfyy}</td> -->
                        </tr>
                    </volist>
                    </tbody>
                </table>
            </div>
            {$page}
        </div>
    </div>
</div>
<script type="text/javascript">
$('.print').click(function(){
    var obj = $('.print_item:checked');
    if(obj.length > 5){
        alert('每页A4纸只能打印5个产品哦');
    }else if(obj.length > 0){
        var ids = 0;
        obj.each(function(i, v){
            ids += ',' + $(v).val();
        });
        window.open('{:U("Product/prints")}?ids=' + ids);
    }else{
        alert('请选择打印项');
    }
});
</script>